<!-- <div class="right-plate" id="synonymTable"> -->
<div class="table-thead" *ngIf="tabVal" [ngClass]="{'table-thead-scroll':tabVal.length > 17}">
  <table class="tableStyle table table-hover table-striped">
    <thead>
      <tr>
        <th class="w5 text-center">
          <input type="checkbox" #event (click)="_selectAll(event.checked,tabVal)" [checked]="isSelectAll">
        </th>
        <th class="w5 text-center max-w">序号</th>
        <th class="w15 text-left max-w">产品名称</th>
        <th class="w10 text-left max-w">所属项目</th>
        <th class="w10 text-left max-w">作者</th>
        <th class="w5 text-left max-w">状态</th>
        <th class="w5 text-left max-w">导入状态</th>
        <th class="w5 text-left max-w">类型</th>
        <th class="w10 text-left max-w">出版日期</th>
        <th class="w20 text-left">操作</th>
      </tr>
    </thead>
  </table>
</div>
<div class="table-tbody">
  <table class="tableStyle table table-hover table-striped">
    <tbody>
      <tr *ngFor="let val of tabVal;let i = index">
        <td class="bs-checkbox w5 text-center">
          <input type="checkbox" #event (click)="_chose(event.checked,val.productId,tabVal.length)" [checked]="isChose">
        </td>
        <td class="w5 text-center">{{ i+1 }}</td>
        <td class="w15 text-left max-w" [title]="val.name">{{ val.name }}</td>
        <td class="w10 text-left max-w" [title]="val.projectName">{{ val.projectName }}</td>
        <td class="w10 text-left max-w">{{ val.author }}</td>
        
        <td class="w5 text-left max-w">
          <span class="stateGreen" *ngIf="val.indexingStatus === 0">启用</span>
          <span class="stateRed" *ngIf="val.indexingStatus === -1">禁用</span>
        </td>
        <td class="w5 text-left max-w">
          <span class="stateGreen" *ngIf="val.importStatus === 1">已完成</span>
          <span class="stateRed" *ngIf="val.importStatus === 0">未完成</span>
        </td>
        <td class="w5 text-left max-w">{{ val.fileFormat }} </td>
        <td class="w10 text-left max-w">{{ val.createTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
        <td class="w20 text-left max-w">
          <span class="tableOperationText" *ngIf="right['contentInnertext']['delete']" data-toggle="modal" data-target="#synonymDelete" (click)="del._detailsId(val.productId)">删除</span>
          <span class="tableOperationText" *ngIf="val.indexingStatus === -1 && right['contentInnertext']['enable']" data-toggle="modal" data-target="#indexingStatusModel"
            (click)="changeIndexingStatus(val.productId,0)">启用</span>
          <span class="tableOperationText" *ngIf="val.indexingStatus === 0 && right['contentInnertext']['disable']" data-toggle="modal" data-target="#indexingStatusModel"
            (click)="changeIndexingStatus(val.productId,-1)">禁用</span>
          <span class="tableOperationText" *ngIf="right['contentInnertext']['details']" data-toggle="modal" data-target="#contentProductDetals" (click)="details._details(val);initService._init(1)">详情</span>
          <!-- <span class="tableOperationText" *ngIf="right['contentInnertext']['preview'] && val.fileFormat != 'xml' && val.fileFormat != 'XML'" (click)="details.preview(val)">预览</span> -->
          <!-- <span class="tableOperationText" *ngIf="right['contentInnertext']['preview'] && (val.fileFormat == 'xml' || val.fileFormat == 'XML')" data-toggle="modal" data-target="#preview" (click)="details.preview(val)">预览</span> -->
          <span class="tableOperationText" *ngIf="right['contentInnertext']['preview']" data-toggle="modal" data-target="#preview" (click)="details.preview(val)">预览</span>
          <!-- <span class="tableOperationText" data-toggle="modal" data-target="#distributeProjectTabs" (click)="projects.getProjectList(val)">设置项目</span> -->
        </td>
      </tr>

    </tbody>
  </table>
</div>
<!-- </div> -->

<!-- 分配项目 -->
<product-content-project  #projects></product-content-project>
<!-- 分配项目 -->

<!-- 预览 BEGIN -->
<app-content-product-details #details (onSubmit)="getContentInnertextList()"></app-content-product-details>
<!-- 预览 BEGIN -->

<!-- 删除 BEGIN -->
<app-content-product-delete #del (delete)="getContentInnertextList()"></app-content-product-delete>
<!-- 删除 BEGIN -->

<!-- 是否启用禁用提示 -->
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static"
  aria-labelledby="myModalLabel" aria-hidden="true" id="indexingStatusModel">
  <div class="modal-dialog delete-modal modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title text-center">启用禁用提示</h4>
      </div>
      <div class="modal-body text-center">
        <p class="delete-prompt" *ngIf="changeCheck === 0">请确认是否启用！</p>
        <p class="delete-prompt" *ngIf="changeCheck === -1">请确认是否禁用！</p>
      </div>
      <div class="modal-footer" style="width: 100%;">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" data-dismiss="modal" *ngIf="changeCheck === 0" (click)="_review(0)">确认</button>
        <button type="button" class="btn btn-primary" data-dismiss="modal" *ngIf="changeCheck === -1" (click)="_review(-1)">确认</button>
      </div>
    </div>
  </div>
</div>
<!-- 是否启用禁用提示 -->